// 常量名

const HISTORY_AGE = 'history_age'

// 获取历史记录
export const getHistory = () => { 
   return  JSON.parse(localStorage.getItem(HISTORY_AGE) || '[]')
}

// 存储历史记录
export const setHistory = (val) => { 
    localStorage.setItem(HISTORY_AGE, JSON.stringify(val))
}

// 删除历史记录
export const removeHistory = () => { 
    localStorage.removeItem(HISTORY_AGE)
}